
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页导航</title>
    <link href="${pageContext.request.contextPath}/css/navigation.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/js/jquery-3.3.1.min.js"></script>
</head>
<body>
<div class="navcation">
    <!--导航上面部分-->
    <div class="nav-top">
        <!--导航上面内容部分-->
        <div class="nav-top-items">
            <!--导航上面左边部分-->
            <a href="" class="nav-items-left">
                <span>苏州</span>
            </a>

            <!--导航上面右边部分-->
            <div class="nav-items-right">
                <c:if test="${empty loginCustomer}">
                <!--登录注册-->
                    <span class="item-logon">
                                <a href="${pageContext.request.contextPath}/member/login.jsp" class="item">你好,请登录</a>
                                <a href="${pageContext.request.contextPath}/member/regist.jsp" class="item logon">免费注册</a>
                      </span>
                </c:if>
                <c:if test="${!empty loginCustomer}">
                     <span class="item-logon">
                                <a href="" class="item">你好,${loginCustomer.cusName}</a>
                                <a href="${pageContext.request.contextPath}/customer/logout" class="item logon">退出</a>
                      </span>
                </c:if>
                <!--内容分割|-->
                <span class="sperate">|</span>
                <!--个人中心-->
                <div class="personal">
                    <a href="" class="per-item">个人中心</a>
                    <!--个人中心下拉菜单部分-->
                    <ul class="per-menu">
                        <li><a href=""></a></li>
                        <li><a href="">我的订单</a></li>
                        <li><a href="">我的评价</a></li>
                        <li><a href="">我的收藏</a></li>
                        <li><a href="">我的优惠券</a></li>
                        <li><a href="">会员中心</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--导航logo和search部分-->
    <div class="search">
        <div class="nav">
            <!--导航logo部分-->
            <div class="logo-left">
                <a href="">
                    <img src="${pageContext.request.contextPath}/images/index_img/logo.png">
                </a>
            </div>
            <!--导航搜索部分-->
            <div class="search-right">
                <div class="form">
                    <form  id="searchForm" >
                        <input type="text" class="search-text" name="keyword" placeholder="搜索商户名、地址、菜名等">
                        <input type="button" class="search-btn" value="搜索">
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(".search-btn").click(function (){
        console.log("====================");
       var keyword = $(".search-text").val();
        console.log("keyword:" + keyword);

        var url ="shop/kw/"+keyword+"/page/1";
        console.log(url);
        location.href = url;
    })
</script>
</body>
</html>
